import request from '@/axios'

function formatRequestUri(name) {
  return 'hr/EmpTitle/' + name
}
export function gets(empId, companyId) {
  return request.get({
    url: formatRequestUri('GetList'),
    params: {
      companyId,
      empId
    }
  })
}
export function add(data) {
  return request.post({
    url: formatRequestUri('Add'),
    data
  })
}
export function deleteTitle(id) {
  return request.get({
    url: formatRequestUri('Delete'),
    params: {
      id
    }
  })
}

export function getTitles(empId, deptId) {
  return request.get({
    url: formatRequestUri('GetTitles'),
    params: {
      deptId,
      empId
    }
  })
}
